import React from 'react'

const BlogItemView = ({data, detail})=>{

    return (
        <div key={data.id} style={{borderBottom: '1px solid #ccc', margin: '0 25px'}} onClick={detail}>
            <div style={{
            fontSize: '0.3rem',
            color: '#000',
            padding: '15px 0'
            }}>{data.title}</div>
            <div style={{fontSize: '0.27rem', color: '#666',}}>
            <div style={{height: '0.6rem', overflow: 'hidden',}}>{data.summary}</div>
            </div>
            <div style={{fontSize: '0.25rem', color: '#333',padding:'0.15rem 0 '}}>
            <span>{data.author.name}</span>
            <span style={{marginLeft:'0.2rem'}}>{data.published}</span>
            </div>
        </div>
    )
}

BlogItemView.propTypes = {}

export default BlogItemView